CHLOG=ChangeLog
TMP=/tmp
MSG=${TMP}/prarie-wiki-commit-msg

# get the changes
svn diff $CHLOG | \
    egrep '^\+'| \
    sed -e 's/^\+//g'| \
    sed -e 's/^/   /g'| \
    sed -e 's/^   \*/ \*/g'| \
    egrep -v '^   \+\+.*ChangeLog' > $MSG

echo
echo "Committing with this message:"
cat $MSG
echo
echo "Changed files:"
admin/stat.sh
echo
svn commit --file $MSG && \
    rm $MSG || \
    echo "There was an error committing; message preserved."
